/*
12-29-10 finished setMindWidth() function and called it onLoad
12-28-10 created file
		added Paul Irish's window.log wrapper
		added function findParentByClass() to remove proper linkedTable nodes on ".removeBtn".click()
*/

// usage: log('inside coolFunc',this,arguments);
// http://paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/
window.log = function(){
  log.history = log.history || [];   // store logs to an array for reference
  log.history.push(arguments);
  if(this.console){
    console.log( Array.prototype.slice.call(arguments) );
  }
};

var findParentByClass = function findParentByClass(node, className) {	
	return (node.hasClass(className)) ? node : findParentByClass(node.parent(), className);
}

var minWidth = 80;
var setMinWidth = function setMinWidth() {
	minWidth += $("#goTo").width();
	minWidth += $(".siteName").width();
	minWidth += $("#currentTableTitle").width();
	minWidth += $("#listBtns").width();
	$(".navigation").css({minWidth: minWidth});
	//log('set minwidth of : '+minWidth+'px');
};

$(function () {
	setMinWidth();
});
